#pragma once
#include "ProjectionMat.hpp"
#include <Math/Vector2.hpp>
#include <Math/Vector3.hpp>
#include <Math/Vector.hpp>
#include "SceneData.hpp"

namespace zzz{
class Triangulator
{
public:
  static Vector3d LinearTriangulate(const vector<ProjectionMat<double> > &P, const vector<Vector2d> &pos2ds);
  static void LinearTriangulate(const ProjectionMat<double> P[2], const vector<Vector2d> pos2ds[2], vector<Vector3d> &pos3ds);
  static void LinearTriangulate(SceneData<double> &sd);

  static void NonLinearTriangulate(const ProjectionMat<double> P[2], const vector<Vector2d> pos2ds[2], vector<Vector3d> &pos3ds);
};

}
